package com.zhengsr.festec;

import android.widget.Toast;

import com.zhengsr.latte.activities.ProxyActivity;
import com.zhengsr.latte.delegates.LatteDelegate;
import com.zhengsr.latte.ec.ec.lunch.ILunchCallback;
import com.zhengsr.latte.ec.ec.lunch.LunchActivity;
import com.zhengsr.latte.ec.ec.main.BottomDelagete;
import com.zhengsr.latte.ec.ec.sign.ISignCallback;
import com.zhengsr.latte.ec.ec.sign.SignInDelegate;
import com.zhengsr.latte.ec.ec.sign.SignUpDelegate;

import qiu.niorgai.StatusBarCompat;

public class MainActivity extends ProxyActivity implements ILunchCallback,
        ISignCallback{


    @Override
    public LatteDelegate setRootDelegate() {
        return new LunchActivity();
    }

    @Override
    public void onSignIn() {
        Toast.makeText(this, "用户已经登录啦", Toast.LENGTH_SHORT).show();
        startWithPop(new BottomDelagete());
        StatusBarCompat.translucentStatusBar(this,true);
    }

    @Override
    public void onNotSignIn() {
        Toast.makeText(this, "用户没有登录哦", Toast.LENGTH_SHORT).show();
        startWithPop(new SignUpDelegate());
       // startWithPop(new BottomDelagete());
    }

    @Override
    public void onSignInSuccess() {
       // Toast.makeText(this, "用户登录成功啦", Toast.LENGTH_SHORT).show();
        startWithPop(new BottomDelagete());
    }

    @Override
    public void onSignUpSuccess() {
        startWithPop(new SignInDelegate());
    }
}
